
import java.util.*;
class Worker{
    private String name;
    private int wages;
    private String id;

    public Worker(String name, int wages, String id) {
        this.name = name;
        this.wages = wages;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getWages() {
        return wages;
    }

    public void setWages(int wages) {
        this.wages = wages;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Worker{" +
                "name='" + name + '\'' +
                ", wages=" + wages +
                ", id='" + id + '\'' +
                '}';
    }
}
public class Main {
    public static void main(String[] args) {
        HashMap hashMap = new HashMap();
        hashMap.put("123",new Worker("xxx",1800,"123"));
        hashMap.put("456",new Worker("xxx",180000,"456"));
        Set set1=hashMap.keySet();
        for (Object Key :set1) {
            Worker worker=(Worker) hashMap.get(Key);
            if(worker.getWages()>18000){
            System.out.println(worker);
            }
        }
        Set set=hashMap.entrySet();
        Iterator iterator= set.iterator();
        while (iterator.hasNext()) {
            Map.Entry next =(Map.Entry) iterator.next();
            Worker worker=(Worker)next.getValue();
            if(worker.getWages()>18000){
            System.out.println(worker);
            }
        }
    }
}